Optimal. Leaf size=77 \[ \frac {3 b x}{8}-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2827, 2713,
2715, 8} \begin {gather*} \frac {a \cos ^3(e+f x)}{3 f}-\frac {a \cos (e+f x)}{f}-\frac {b \sin ^3(e+f x) \cos (e+f x)}{4 f}-\frac {3 b \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3 b x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2827
Rubi steps
\begin {align*} \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \sin ^3(e+f x) \, dx+b \int \sin ^4(e+f x) \, dx\\ &=-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}+\frac {1}{4} (3 b) \int \sin ^2(e+f x) \, dx-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}+\frac {1}{8} (3 b) \int 1 \, dx\\ &=\frac {3 b x}{8}-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 76, normalized size = 0.99 \begin {gather*} \frac {3 b (e+f x)}{8 f}-\frac {3 a \cos (e+f x)}{4 f}+\frac {a \cos (3 (e+f x))}{12 f}-\frac {b \sin (2 (e+f x))}{4 f}+\frac {b \sin (4 (e+f x))}{32 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 60, normalized size = 0.78
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(60\) |
default | \(\frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(60\) |
risch | \(\frac {3 b x}{8}-\frac {3 a \cos \left (f x +e \right )}{4 f}+\frac {b \sin \left (4 f x +4 e \right )}{32 f}+\frac {a \cos \left (3 f x +3 e \right )}{12 f}-\frac {b \sin \left (2 f x +2 e \right )}{4 f}\) | \(63\) |
norman | \(\frac {\frac {3 b x}{8}-\frac {4 a}{3 f}-\frac {3 b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {11 b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {11 b \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {3 b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {3 b x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {9 b x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {3 b x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {3 b x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}-\frac {4 a \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {16 a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(188\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 62, normalized size = 0.81 \begin {gather*} \frac {32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b}{96 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.50, size = 65, normalized size = 0.84 \begin {gather*} \frac {8 \, a \cos \left (f x + e\right )^{3} + 9 \, b f x - 24 \, a \cos \left (f x + e\right ) + 3 \, {\left (2 \, b \cos \left (f x + e\right )^{3} - 5 \, b \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 144 vs.
\(2 (70) = 140\).
time = 0.18, size = 144, normalized size = 1.87 \begin {gather*} \begin {cases} - \frac {a \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 b x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right ) \sin ^{3}{\left (e \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 66, normalized size = 0.86 \begin {gather*} \frac {3}{8} \, b x + \frac {a \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {3 \, a \cos \left (f x + e\right )}{4 \, f} + \frac {b \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {b \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.29, size = 111, normalized size = 1.44 \begin {gather*} \frac {3\,b\,x}{8}-\frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}-\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {16\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{3}+\frac {3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}+\frac {4\,a}{3}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________